package com.zeroone.star.publish.service.impl;


import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.zeroone.star.publish.entity.THistory;
import com.zeroone.star.publish.mapper.THistoryMapper;
import com.zeroone.star.publish.service.ITHistoryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @program: car-time-bank
 * @description:
 * @author: car
 * @create: 2024-04-12 17:22
 **/
@Service
public class THistoryServiceImpl extends ServiceImpl<THistoryMapper, THistory> implements ITHistoryService {
    @Autowired
    private THistoryMapper tHistoryMapper;
    @Override
    public List<THistory> searchOnceTransition(String userId) {
        QueryWrapper<THistory> wrapper = new QueryWrapper<>();
        wrapper.eq("get_id",userId).or().eq("send_id",userId);
        return tHistoryMapper.selectList(wrapper);
    }
}
